import React, { Component } from 'react';
//1 属性代理 a.1 操作props
class App extends Component {
  render() {
    return (
      <div>
        <h1>App组件</h1>
      </div>
    );
  }
}
// react-router withRouter(App) = >history,添加路由的特性
// 2 connect (props,dispatch)(App) redux 
function HigherOrderComponent(WrappedComponent){
return class extends Component{
  handleClick = (params) => {
    console.log("click方法 ")
  }
  render(){
    let newProps = {
      msg:"(Q_Q)"
    }
    return <WrappedComponent{...newProps} handleClick={this.handleClick}></WrappedComponent>
  }
}
}
export default HigherOrderComponent(App);

